package  com.diamond.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.diamond.entity.Message;
import com.diamond.facade.MessageFacade;
import com.opensymphony.xwork2.ActionSupport;

/**
 * MessageAction ������
 * @author JSmart Tools
 */
public class IndexAction extends ActionSupport {

	private HttpServletRequest request = ServletActionContext.getRequest();
	private MessageFacade messageFacade;
	private Message message;
	private List dataList;
	private List knowList;

	
	public String toindex(){
		dataList = messageFacade.listTop();
		knowList = messageFacade.listKnow();
		return SUCCESS;
	}

//----------------common----------------------------------------	
	public void setMessageFacade(MessageFacade messageFacade) {
		this.messageFacade = messageFacade;
	}
	
	public List getDataList() {
		return dataList;
	}

	public void setDataList(List dataList) {
		this.dataList = dataList;
	}

	public List getKnowList() {
		return knowList;
	}
	
	public void setKnowList(List knowList) {
		this.knowList = knowList;
	}
	
	public Message getMessage() {
		return message;
	}

	public void setMessage(Message message) {
		this.message = message;
	}

}
